package com.howtoplay.WebSocketController;

import Animotion.WSUri;
import Bean.User;
import com.anoyi.grpc.util.ProtobufUtils;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.WebSocketSession;

@Component
@WSUri
public class WsTestController {
    @WSUri(value = "test1")
    public void test1(byte[] bytes, WebSocketSession session) {
        User u = ProtobufUtils.deserialize(bytes, User.class);
        System.out.println(u.toString());
    }
}
